package com.ruoyi.system.service.impl;

import com.ruoyi.common.core.text.Convert;
import com.ruoyi.system.domain.RnxInviteLog;
import com.ruoyi.system.mapper.RnxInviteLogMapper;
import com.ruoyi.system.service.IRnxInviteLogService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * 邀请记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-05-06
 */
@Service
public class RnxInviteLogServiceImpl implements IRnxInviteLogService 
{
    @Resource
    private RnxInviteLogMapper rnxInviteLogMapper;

    /**
     * 查询邀请记录
     * 
     * @param id 邀请记录主键
     * @return 邀请记录
     */
    @Override
    public RnxInviteLog selectRnxInviteLogById(Long id)
    {
        return rnxInviteLogMapper.selectRnxInviteLogById(id);
    }

    /**
     * 查询邀请记录列表
     * 
     * @param rnxInviteLog 邀请记录
     * @return 邀请记录
     */
    @Override
    public List<RnxInviteLog> selectRnxInviteLogList(RnxInviteLog rnxInviteLog)
    {
        return rnxInviteLogMapper.selectRnxInviteLogList(rnxInviteLog);
    }

    /**
     * 新增邀请记录
     * 
     * @param rnxInviteLog 邀请记录
     * @return 结果
     */
    @Override
    public int insertRnxInviteLog(RnxInviteLog rnxInviteLog)
    {
        return rnxInviteLogMapper.insertRnxInviteLog(rnxInviteLog);
    }

    /**
     * 修改邀请记录
     * 
     * @param rnxInviteLog 邀请记录
     * @return 结果
     */
    @Override
    public int updateRnxInviteLog(RnxInviteLog rnxInviteLog)
    {
        return rnxInviteLogMapper.updateRnxInviteLog(rnxInviteLog);
    }

    /**
     * 批量删除邀请记录
     * 
     * @param ids 需要删除的邀请记录主键
     * @return 结果
     */
    @Override
    public int deleteRnxInviteLogByIds(String ids)
    {
        return rnxInviteLogMapper.deleteRnxInviteLogByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除邀请记录信息
     * 
     * @param id 邀请记录主键
     * @return 结果
     */
    @Override
    public int deleteRnxInviteLogById(Long id)
    {
        return rnxInviteLogMapper.deleteRnxInviteLogById(id);
    }

	@Override
	public RnxInviteLog selectRnxInviteLogByPhone(String phone) {
		return rnxInviteLogMapper.selectRnxInviteLogByPhone(phone);
	}
}
